<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>基础知识</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"" rel=" stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/animate.css/3.2.3/animate.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../../static/css/public.css" />
</head>

<body>
    <!--右边内容-->
    <div id="app" class="main animated fadeInRight">
        <div class="shadow">
            <div>
                <h4>escape(编码) 和 unescape(解码)</h4>
                <pre>
	var url = "http://www.baidu.com/s?";	
	url = url + escape("name=小米");
	alert(url); =>"http://www.baidu.com/s?name%3D%u5C0F%u7C73"
	alert(unescape(url));=>"http://www.baidu.com/s?name=小米"			
				</pre>
            </div>
            <div>
                <h4>encodeURIComponent(url) 函数 decodeURIComponent(url) 函数</h4>
                <pre>
	var url = "http://www.baidu.com/s?";	
	url = url + encodeURIComponent("name=小米");
	alert(url); =>"http://www.baidu.com/s?name%3D%E5%B0%8F%E7%B1%B3"
	alert(decodeURIComponent(url));=>"http://www.baidu.com/s?name=小米"
				</pre>
            </div>
        </div>
    </div>
    <!--页面加载进度条-->
    <script src="https://cdn.bootcdn.net/ajax/libs/pace/0.5.0/pace.min.js"></script>
</body>

</html>